import React from 'react'
import '@/style/App.scss'
// App.tsx
// 导入路由
import {
  BrowserRouter as Router,
  Route,
  Redirect
} from 'react-router-dom'

// 导入页面组件
import Layout from '@/pages/Layout'
import Login from '@/pages/Login'

// 配置路由规则
function App () {
  return (
    <div className="app">
      <Router>
        <Route exact path="/" render={() => <Redirect to="/login" />} />
        <Route path="/home">
          <Layout />
        </Route>
        <Route path="/login">
          <Login />
        </Route>
      </Router>
    </div>
  )
}

export default App
